<?php


namespace app\bock\type;


abstract class INode
{
    /**
     * 节点所在位置
     * @var Point
     */
    protected $point;

    /**
     * INode constructor.
     * @param Point $point
     */
    public function __construct(Point $point)
    {
        $this->setPoint($point);
    }

    /**
     * @param Point $point
     */
    public function setPoint($point)
    {
        $this->point = $point;
    }

    /**
     * @return Point
     */
    public function getPoint()
    {
        return $this->point;
    }

    /**
     * 每个节点都有自己的显示方法
     * @param Panel $panel
     */
    abstract public function show(Panel $panel);

    /**
     * 渲染
     * @return string
     */
    abstract public function render();

}